﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Ext.Net;
using ArbolandiaBL;

public partial class catalogSubCategoryDetailCtrl : System.Web.UI.UserControl
{
    //protected void Page_Load(object sender, EventArgs e)
    //{
    //    if (!X.IsAjaxRequest)
    //    {
           
    //    }
    //}

    //public Store GridStore { get; set; }

    //public void Show()
    //{
    //    this.SubcategoryDetailsWindow.Show();
    //}

    //public void SetSubCategory(Product_SubCategory subCategory)
    //{
    //    CompanyInfoTab.SetValues(subCategory);
    //}

    //protected void SaveSubcategory(object sender, DirectEventArgs e)
    //{
    //    //NorthwindDataContext db = new NorthwindDataContext();
    //    int id = int.Parse(e.ExtraParams["id"]);

    //    Product_SubCategory subc = new Product_SubCategory();
    //    var x = this.Id.Text;
    //    subc.FullDescription = this.FullDescription.Text;
    //    if (!string.IsNullOrEmpty(this.Product_CategoryId.SelectedItem.Value))
    //    {
    //        subc.Product_CategoryId = int.Parse(this.Product_CategoryId.SelectedItem.Value);
    //    }
    //    else
    //    {
    //        subc.Product_CategoryId = 0;
    //    }

    //    new Service().InsertUpdateSubCategory(subc);

    //    //db.SubmitChanges();

    //    var record = this.GridStore.GetById(id);

    //    this.SubcategoryDetailsWindow.Hide();
    //    CompanyInfoTab.UpdateRecord(record);
    //    //PersonalInfoTab.UpdateRecord(record);
    //    record.Commit();
    //}
}